import React from "react";
import styles from "@pages/search/styles/styles.module.less";
import SuggestionItem from "@pages/search/widgets/suggestion/item/index";

interface Props {
    suggestions: { origin: string; name: string }[];
}

export default function Suggestion({ suggestions }: Props) {
    return (
        <ul className={styles.suggest}>
            {suggestions.map((item) => (
                <SuggestionItem key={item.name} item={item} />
            ))}
        </ul>
    );
}